import logging,pytest,yagmail

def set_in():
    logcat=logging.basicConfig(filename='gouwu.log',
                        filemode='a+',
                        level=logging.DEBUG,
                        format="%(asctime)s -> %(levelname)s -> %(filename)s -> %(message)s")
    return logcat
def send_mail(filepath):
    mail = yagmail.SMTP(user="774877770@qq.com",password="fjvmkwjdijkfbajg",host="smtp.qq.com")

    mail.send(to="1522057104@qq.com",subject="购物平台",contents="内容",attachments=filepath)